/*
 * $Id: TaskRequestTag.java,v 1.4 2009/07/29 17:27:00 oliver Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;



import org.jdom.Element;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

@XStreamAlias("task")
public class TaskRequestTag {
	@XStreamAsAttribute
	private Long id = null;
	@XStreamAlias("info")
	private TaskRequestInfoTag taskRequestInfoTag = null;
	private Element command;
	@XStreamOmitField
	private CommandTag commandTag = null;
	
	public TaskRequestTag() {}
	
	public TaskRequestTag(Long id,
						TaskRequestInfoTag taskRequestInfoTag,
						Element command) {
		this.id = id;
		this.taskRequestInfoTag = taskRequestInfoTag;
		this.command = command;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public Long getId() {
		return id;
	}
	
	public void setTaskRequestInfo(TaskRequestInfoTag taskRequestInfoTag) {
		this.taskRequestInfoTag = taskRequestInfoTag;
	}
	
	public TaskRequestInfoTag getTaskRequestInfo() {
		return taskRequestInfoTag;
	}
	public void setDoc(Element commandElement) {
		this.command = commandElement;
	}

	public CommandTag getCommandTag() {
		return commandTag;
	}

	public void setCommandTag(CommandTag commandTag) {
		this.commandTag = commandTag;
	}
	
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(TaskRequestTag.class.getName()).append(":\n");
		msg.append("{Id: ").append(getId()).append("}");
		msg.append(taskRequestInfoTag.toString());
		msg.append(commandTag.toString());
		msg.append("\n");
		return msg.toString();
	}

	/**
	 * @return the command
	 */
	public Element getCommand() {
		return command;
	}

	/**
	 * @param command the command to set
	 */
	public void setCommand(Element command) {
		this.command = command;
	}
}
